﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Model;

namespace BLL
{
    public class GetDataByVW_NameForWebServiceBLL:BaseBLL
    {
        public GetDataByVW_NameForWebServiceBLL(LoginInfo info){
            base.loginInfo = info;
        }

        /// <summary>
        /// 根据传入的用户名和是视图名+环境配置返回结果集，测试阶段
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <param name="vwName">视图名</param>
        /// <returns>结果集</returns>
        public DataTable GetData(string userName, string schema, string vwName)
        {
            DAL.GetDataByVW_NameForWebServiceDAL gd = new DAL.GetDataByVW_NameForWebServiceDAL(loginInfo);
            return gd.GetData(userName, schema, vwName);
        }

        public int GetViewPushType(string userName, string schema, string vwName)
        {
            DAL.GetDataByVW_NameForWebServiceDAL gd = new DAL.GetDataByVW_NameForWebServiceDAL(loginInfo);
            return gd.GetViewPushType(userName, schema, vwName);
        }

        /// <summary>
        /// 返回对接系统的线程数
        /// </summary>
        /// <param name="userName">对接系统code</param>
        /// <returns>threads</returns>
        public int GetThreads(string userName)
        {
            DAL.GetDataByVW_NameForWebServiceDAL gd = new DAL.GetDataByVW_NameForWebServiceDAL(loginInfo);
            return gd.GetThreads(userName);
        }
    }
}
